#include <stdio.h>
int main()
{
    int a=0;
    int b=0;
    //shuru
    scanf("%d %d", &a, &b);
    //jisuan
    int c = a/b;
    int d = a%b;
    //shuchu
    printf("%d %d\n", c, d);
    
    return 0;
}